import _login from './views/index.vue'
import _index from './views/home.vue'
import _dashboard from './views/dashboard.vue'
import _role from './views/role.vue'

const routers = [
  {
    path: '/',
    name: '/',
    meta: {
      title: '登录页'
    },
    //component: resolve => require(['./views/index.vue'], resolve)
    component: _login
  },
  {
    path: '/index',
    name: '/index',
    meta: { title: 'CMS系统' },
    component: _index,
    children: [
      {
        path: '/dashboard',
        name: '/dashboard',
        component: _dashboard
      },
      {
        path: '/role',
        name: '/role',
        component: _role
      }
    ]
  }
]
export default routers
